﻿using Omniscient.Foundation.Data;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Omniscient.TimeTracker.Data
{

    public class Task : EntityBase
    {
        public Task()
            : base()
        {}

        public Task(Guid id, bool entityIsLoaded)
            : base(id, entityIsLoaded)
        {}

        public Task(Guid id, Guid parentProjectId)
            : base(id, true)
        {
            ParentProject = new Project(parentProjectId, false);
        }

        public Task(string name)
            : base()
        {
            Name = name;
        }

        public string Name { get; set; }
        public string Description { get; set; }
        public DateTime StartDate { get; set; }
        public DateTime EndDate { get; set; }
        public int IssueNumber { get; set; }
        public int Priority { get; set; }

        /// <summary>
        /// Status is like: Open - Not assigned, Fixed - Pending Build, QA Faild, Closed, etc. 
        /// </summary>
        public TaskStatus TaskStatus { get; set; }

        /// <summary>
        /// Project that the task is created in.
        /// </summary>
        public Project ParentProject { get; set; }

    }
}
